home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / A-B / ButtonStax.cpt / F_X / card_3165.txt < prev    next >
Text File  |  1989-02-26  |  16KB  |  719 lines

  1. -- card: 3165 from stack: in
  2. -- bmap block id: 5350
  3. -- flags: 0000
  4. -- background id: 2620
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on openCard
  8.   global theScript, cmd
  9.   -- Look of a "visual" command in the button's script. Use this
  10.   -- command as the default settings of the buttons
  11.   put 1 into theLine
  12.   repeat until theLine > the number of lines in theScript
  13.     if line theLine of theScript contains "visual" then
  14.       -- here is the "visual" command. remove any leading spaces
  15.       put line theLine of theScript into liner
  16.       put 1 into theChar
  17.       repeat until char theChar of liner <> space
  18.         add 1 to theChar
  19.       end  repeat
  20.       put char theChar to length of liner of liner into liner
  21.       -- if the visual stmt is the same as what we last set, then the
  22.       -- buttons are already set correctly, and we can exit.
  23.       if liner = cmd then exit openCard
  24.       --Otherwise, pick out effect, direction, speed & set
  25.       -- the corresponding buttons
  26.       put 2 into theWord
  27.       put the number of words in line theLine of theScript into spword
  28.       repeat until theWord > spword
  29.         put quote into theButton
  30.         put word theWord of line theLine of theScript after theButton
  31.         if theButton = quote & "very" or theButton = quote & "barn" then
  32.           add 1 to theWord
  33.           put " " & word theWord of line theLine of theScript after theButton
  34.         end if
  35.         put quote after theButton
  36.         put "send mouseUp to card button" && thebutton into pushit
  37.         do pushit
  38.         add 1 to theWord
  39.       end repeat
  40.       -- if there is no speed specified in the "visual" command, set
  41.       -- normal speed
  42.       put word spword of line theLine of theScript into speed
  43.       if speed <> "slow" and speed <> "fast" then
  44.         send mouseUp to button normal
  45.       end if
  46.       exit openCard
  47.     end if
  48.     add 1 to theLine
  49.   end repeat
  50.   if theLine > the number of lines in theScript then
  51.     -- the button script does not contain a "visual" command, so set
  52.     -- standard defaults
  53.     send mouseUp to card button iris
  54.     send mouseUp to card button normal
  55.   end if
  56. end openCard
  57.  
  58.  
  59. on clearFX
  60.   set cursor to 4
  61.   set hilite of button iris to false
  62.   set hilite of button wipe to false
  63.   set hilite of button "scroll" to false
  64.   set hilite of button "barn door" to false
  65.   set hilite of button "dissolve" to false
  66.   set hilite of button "checkerboard" to false
  67.   set hilite of button "venetian blinds" to false
  68.   set hilite of button "zoom" to false
  69. end clearFX
  70.  
  71. on clearDirection
  72.   set cursor to 4
  73.   set hilite of button up to false
  74.   set hilite of button down to false
  75.   set hilite of button left to false
  76.   set hilite of button right to false
  77.   set hilite of button open to false
  78.   set hilite of button close to false
  79. end clearDirection
  80.  
  81.  
  82. on clearSpeed
  83.   set cursor to 4
  84.   set hilite of button "very fast" to false
  85.   set hilite of button fast to false
  86.   set hilite of button normal to false
  87.   set hilite of button slow to false
  88.   set hilite of button "very slow" to false
  89. end clearSpeed
  90.  
  91.  
  92.  
  93.  
  94. -- part 1 (button)
  95. -- low flags: 00
  96. -- high flags: 8006
  97. -- rect: left=41 top=142 right=164 bottom=141
  98. -- title width / last selected line: 0
  99. -- icon id / first selected line: 0 / 0
  100. -- text alignment: 1
  101. -- font id: 0
  102. -- text size: 12
  103. -- style flags: 0
  104. -- line height: 16
  105. -- part name: Wipe
  106. ----- HyperTalk script -----
  107. on mouseUp
  108.   global fx
  109.   clearFX
  110.   put "wipe" into fx
  111.   set the hilite of button fx to true
  112.   hide button Open
  113.   hide button close
  114.   show button up
  115.   show button down
  116.   show button left
  117.   show button right
  118.   send mouseUp to button left
  119. end mouseUp
  120.  
  121.  
  122.  
  123. -- part 2 (button)
  124. -- low flags: 00
  125. -- high flags: 8006
  126. -- rect: left=41 top=169 right=191 bottom=141
  127. -- title width / last selected line: 0
  128. -- icon id / first selected line: 0 / 0
  129. -- text alignment: 1
  130. -- font id: 0
  131. -- text size: 12
  132. -- style flags: 0
  133. -- line height: 16
  134. -- part name: Zoom
  135. ----- HyperTalk script -----
  136. on mouseUp
  137.   global fx
  138.   clearFX
  139.   put "zoom" into fx
  140.   set the hilite of button fx to true
  141.   show button Open
  142.   show button close
  143.   hide button up
  144.   hide button down
  145.   hide button left
  146.   hide button right
  147.   send mouseUp to button open
  148. end mouseUp
  149.  
  150.  
  151.  
  152. -- part 3 (button)
  153. -- low flags: 00
  154. -- high flags: 8006
  155. -- rect: left=41 top=196 right=218 bottom=141
  156. -- title width / last selected line: 0
  157. -- icon id / first selected line: 0 / 0
  158. -- text alignment: 1
  159. -- font id: 0
  160. -- text size: 12
  161. -- style flags: 0
  162. -- line height: 16
  163. -- part name: Barn Door
  164. ----- HyperTalk script -----
  165. on mouseUp
  166.   global fx
  167.   clearFX
  168.   put "barn door" into fx
  169.   set the hilite of button "barn door" to true
  170.   show button Open
  171.   show button close
  172.   hide button up
  173.   hide button down
  174.   hide button left
  175.   hide button right
  176.   send mouseUp to button open
  177. end mouseUp
  178.  
  179.  
  180.  
  181. -- part 4 (button)
  182. -- low flags: 00
  183. -- high flags: 8006
  184. -- rect: left=41 top=222 right=244 bottom=141
  185. -- title width / last selected line: 0
  186. -- icon id / first selected line: 0 / 0
  187. -- text alignment: 1
  188. -- font id: 0
  189. -- text size: 12
  190. -- style flags: 0
  191. -- line height: 16
  192. -- part name: Dissolve
  193. ----- HyperTalk script -----
  194. on mouseUp
  195.   global fx, dir
  196.   clearFX
  197.   put "dissolve" into fx
  198.   put empty into dir
  199.   set the hilite of button fx to true
  200.   hide button Open
  201.   hide button close
  202.   hide button up
  203.   hide button down
  204.   hide button left
  205.   hide button right
  206. end mouseUp
  207.  
  208.  
  209.  
  210. -- part 5 (button)
  211. -- low flags: 80
  212. -- high flags: 8006
  213. -- rect: left=205 top=117 right=139 bottom=305
  214. -- title width / last selected line: 0
  215. -- icon id / first selected line: 0 / 0
  216. -- text alignment: 1
  217. -- font id: 0
  218. -- text size: 12
  219. -- style flags: 0
  220. -- line height: 16
  221. -- part name: Left
  222. ----- HyperTalk script -----
  223. on mouseUp
  224.   global dir
  225.   put "left" into dir
  226.   clearDirection
  227.   set the hilite of button dir to true
  228. end mouseUp
  229.  
  230.  
  231.  
  232. -- part 6 (button)
  233. -- low flags: 80
  234. -- high flags: 8006
  235. -- rect: left=205 top=143 right=165 bottom=305
  236. -- title width / last selected line: 0
  237. -- icon id / first selected line: 0 / 0
  238. -- text alignment: 1
  239. -- font id: 0
  240. -- text size: 12
  241. -- style flags: 0
  242. -- line height: 16
  243. -- part name: Right
  244. ----- HyperTalk script -----
  245. on mouseUp
  246.   global dir
  247.   put "right" into dir
  248.   clearDirection
  249.   set the hilite of button dir to true
  250.  
  251. end mouseUp
  252.  
  253.  
  254.  
  255. -- part 7 (button)
  256. -- low flags: 80
  257. -- high flags: 8006
  258. -- rect: left=205 top=170 right=192 bottom=305
  259. -- title width / last selected line: 0
  260. -- icon id / first selected line: 0 / 0
  261. -- text alignment: 1
  262. -- font id: 0
  263. -- text size: 12
  264. -- style flags: 0
  265. -- line height: 16
  266. -- part name: Up
  267. ----- HyperTalk script -----
  268. on mouseUp
  269.   global dir
  270.   put "up" into dir
  271.   clearDirection
  272.   set the hilite of button dir to true
  273.  
  274. end mouseUp
  275.  
  276.  
  277.  
  278. -- part 8 (button)
  279. -- low flags: 80
  280. -- high flags: 8006
  281. -- rect: left=205 top=196 right=218 bottom=305
  282. -- title width / last selected line: 0
  283. -- icon id / first selected line: 0 / 0
  284. -- text alignment: 1
  285. -- font id: 0
  286. -- text size: 12
  287. -- style flags: 0
  288. -- line height: 16
  289. -- part name: Down
  290. ----- HyperTalk script -----
  291. on mouseUp
  292.   global dir
  293.   put "down" into dir
  294.   clearDirection
  295.   set the hilite of button dir to true
  296.  
  297. end mouseUp
  298.  
  299.  
  300.  
  301. -- part 9 (button)
  302. -- low flags: 00
  303. -- high flags: 8006
  304. -- rect: left=339 top=169 right=191 bottom=439
  305. -- title width / last selected line: 0
  306. -- icon id / first selected line: 0 / 0
  307. -- text alignment: 1
  308. -- font id: 0
  309. -- text size: 12
  310. -- style flags: 0
  311. -- line height: 16
  312. -- part name: Normal
  313. ----- HyperTalk script -----
  314. on mouseUp
  315.   global sp
  316.   put empty into sp
  317.   clearspeed
  318.   set the hilite of button "normal" to true
  319.  
  320. end mouseUp
  321.  
  322.  
  323.  
  324. -- part 10 (button)
  325. -- low flags: 00
  326. -- high flags: 8006
  327. -- rect: left=339 top=142 right=164 bottom=439
  328. -- title width / last selected line: 0
  329. -- icon id / first selected line: 0 / 0
  330. -- text alignment: 1
  331. -- font id: 0
  332. -- text size: 12
  333. -- style flags: 0
  334. -- line height: 16
  335. -- part name: Fast
  336. ----- HyperTalk script -----
  337. on mouseUp
  338.   global sp
  339.   put "fast" into sp
  340.   clearspeed
  341.   set the hilite of button sp to true
  342.  
  343. end mouseUp
  344.  
  345.  
  346.  
  347. -- part 11 (button)
  348. -- low flags: 00
  349. -- high flags: 8006
  350. -- rect: left=339 top=116 right=138 bottom=439
  351. -- title width / last selected line: 0
  352. -- icon id / first selected line: 0 / 0
  353. -- text alignment: 1
  354. -- font id: 0
  355. -- text size: 12
  356. -- style flags: 0
  357. -- line height: 16
  358. -- part name: Very Fast
  359. ----- HyperTalk script -----
  360. on mouseUp
  361.   global sp
  362.   put "very fast" into sp
  363.   clearspeed
  364.   set the hilite of button sp to true
  365. end mouseUp
  366.  
  367.  
  368.  
  369. -- part 12 (button)
  370. -- low flags: 00
  371. -- high flags: C006
  372. -- rect: left=339 top=196 right=218 bottom=439
  373. -- title width / last selected line: 0
  374. -- icon id / first selected line: 0 / 0
  375. -- text alignment: 1
  376. -- font id: 0
  377. -- text size: 12
  378. -- style flags: 0
  379. -- line height: 16
  380. -- part name: Slow
  381. ----- HyperTalk script -----
  382. on mouseUp
  383.   global sp
  384.   put "slow" into sp
  385.   clearspeed
  386.   set the hilite of button sp to true
  387.  
  388. end mouseUp
  389.  
  390.  
  391.  
  392. -- part 13 (button)
  393. -- low flags: 00
  394. -- high flags: 8006
  395. -- rect: left=339 top=222 right=244 bottom=439
  396. -- title width / last selected line: 0
  397. -- icon id / first selected line: 0 / 0
  398. -- text alignment: 1
  399. -- font id: 0
  400. -- text size: 12
  401. -- style flags: 0
  402. -- line height: 16
  403. -- part name: Very Slow
  404. ----- HyperTalk script -----
  405. on mouseUp
  406.   global sp
  407.   put "very slow" into sp
  408.   clearspeed
  409.   set the hilite of button sp to true
  410.  
  411. end mouseUp
  412.  
  413.  
  414.  
  415. -- part 14 (button)
  416. -- low flags: 00
  417. -- high flags: 8006
  418. -- rect: left=41 top=248 right=270 bottom=141
  419. -- title width / last selected line: 0
  420. -- icon id / first selected line: 0 / 0
  421. -- text alignment: 1
  422. -- font id: 0
  423. -- text size: 12
  424. -- style flags: 0
  425. -- line height: 16
  426. -- part name: Scroll
  427. ----- HyperTalk script -----
  428. on mouseUp
  429.   global fx
  430.   clearFX
  431.   put "scroll" into fx
  432.   set the hilite of button fx to true
  433.   hide button Open
  434.   hide button close
  435.   show button up
  436.   show button down
  437.   show button left
  438.   show button right
  439.   send mouseUp to button left
  440.  
  441. end mouseUp
  442.  
  443.  
  444.  
  445. -- part 15 (button)
  446. -- low flags: 00
  447. -- high flags: 8006
  448. -- rect: left=41 top=274 right=296 bottom=156
  449. -- title width / last selected line: 0
  450. -- icon id / first selected line: 0 / 0
  451. -- text alignment: 1
  452. -- font id: 0
  453. -- text size: 12
  454. -- style flags: 0
  455. -- line height: 16
  456. -- part name: Checkerboard
  457. ----- HyperTalk script -----
  458. on mouseUp
  459.   global fx, dir
  460.   clearFX
  461.   put "checkerboard" into fx
  462.   put empty into dir
  463.   set the hilite of button fx to true
  464.   hide button Open
  465.   hide button close
  466.   hide button up
  467.   hide button down
  468.   hide button left
  469.   hide button right
  470. end mouseUp
  471.  
  472.  
  473.  
  474. -- part 16 (button)
  475. -- low flags: 00
  476. -- high flags: 8006
  477. -- rect: left=41 top=300 right=322 bottom=165
  478. -- title width / last selected line: 0
  479. -- icon id / first selected line: 0 / 0
  480. -- text alignment: 1
  481. -- font id: 0
  482. -- text size: 12
  483. -- style flags: 0
  484. -- line height: 16
  485. -- part name: Venetian Blinds
  486. ----- HyperTalk script -----
  487. on mouseUp
  488.   global fx, dir
  489.   clearFX
  490.   put "venetian blinds" into fx
  491.   put empty into dir
  492.   set the hilite of button fx to true
  493.   hide button Open
  494.   hide button close
  495.   hide button up
  496.   hide button down
  497.   hide button left
  498.   hide button right
  499. end mouseUp
  500.  
  501.  
  502.  
  503. -- part 17 (button)
  504. -- low flags: 00
  505. -- high flags: C006
  506. -- rect: left=41 top=116 right=138 bottom=141
  507. -- title width / last selected line: 0
  508. -- icon id / first selected line: 0 / 0
  509. -- text alignment: 1
  510. -- font id: 0
  511. -- text size: 12
  512. -- style flags: 0
  513. -- line height: 16
  514. -- part name: Iris
  515. ----- HyperTalk script -----
  516. on mouseUp
  517.   global fx
  518.   clearFX
  519.   put "iris" into fx
  520.   set the hilite of button fx to true
  521.   show button Open
  522.   show button close
  523.   hide button up
  524.   hide button down
  525.   hide button left
  526.   hide button right
  527.   send mouseUp to button open
  528. end mouseUp
  529.  
  530.  
  531.  
  532. -- part 18 (button)
  533. -- low flags: 00
  534. -- high flags: C006
  535. -- rect: left=205 top=222 right=244 bottom=305
  536. -- title width / last selected line: 0
  537. -- icon id / first selected line: 0 / 0
  538. -- text alignment: 1
  539. -- font id: 0
  540. -- text size: 12
  541. -- style flags: 0
  542. -- line height: 16
  543. -- part name: Open
  544. ----- HyperTalk script -----
  545. on mouseUp
  546.   global dir
  547.   put "open" into dir
  548.   clearDirection
  549.   set the hilite of button dir to true
  550.  
  551. end mouseUp
  552.  
  553.  
  554.  
  555. -- part 19 (button)
  556. -- low flags: 00
  557. -- high flags: 8006
  558. -- rect: left=205 top=248 right=270 bottom=305
  559. -- title width / last selected line: 0
  560. -- icon id / first selected line: 0 / 0
  561. -- text alignment: 1
  562. -- font id: 0
  563. -- text size: 12
  564. -- style flags: 0
  565. -- line height: 16
  566. -- part name: Close
  567. ----- HyperTalk script -----
  568. on mouseUp
  569.   global dir
  570.   put "close" into dir
  571.   clearDirection
  572.   set the hilite of button dir to true
  573.  
  574. end mouseUp
  575.  
  576.  
  577.  
  578. -- part 20 (button)
  579. -- low flags: 00
  580. -- high flags: A003
  581. -- rect: left=339 top=265 right=287 bottom=439
  582. -- title width / last selected line: 0
  583. -- icon id / first selected line: 0 / 0
  584. -- text alignment: 1
  585. -- font id: 0
  586. -- text size: 12
  587. -- style flags: 0
  588. -- line height: 16
  589. -- part name: OK
  590. ----- HyperTalk script -----
  591. on mouseUp
  592.   global cmd, fx, dir, sp, theScript
  593.   -- fx, dir and sp contain the pieces of the command to be inserted
  594.   -- into the button script, first build the command. Since not all
  595.   -- effects use a direction, and since speed defaults to normal, we
  596.   -- must verify that they are present before we insert them, or we
  597.   -- wind up with exterraneous spaces that louse up comparisons later.
  598.   put "visual" && fx into cmd
  599.   if dir <> empty then put  " " & dir after cmd
  600.   if sp <> empty then put  " " & sp after cmd
  601.   -- return to the card containing both the "Button F/X" button and the
  602.   -- button to be modified
  603.   pop card
  604.   get the script of button the number of buttons
  605.   put it into theScript
  606.   -- look for an existing "visual" command in the button script. If
  607.   -- present, remove it.
  608.   put 1 into theLine
  609.   put the number of lines in theScript into endpt
  610.   repeat until theLine>endpt
  611.     if line theLine of theScript contains "visual" then
  612.       -- take everything ahead of the line containing the "visual",
  613.       -- plus everything after it, but not the line itself.
  614.       put line 1 to theLine-1 of theScript & return & line theLine+1 to the number of lines in theScript of theScript into theScript
  615.       -- since we just removed a line, our endpt moves up
  616.       subtract 1 from endpt
  617.       exit repeat
  618.     end if
  619.     add 1 to theLine
  620.   end repeat
  621.   -- add our "visual" command and update the button script
  622.   put return && cmd after line 1 of theScript
  623.   set the script of button the number of buttons to theScript
  624.   -- mission accomplished. go home.
  625. end mouseUp
  626.  
  627.  
  628.  
  629. -- part 21 (button)
  630. -- low flags: 00
  631. -- high flags: A003
  632. -- rect: left=339 top=295 right=317 bottom=439
  633. -- title width / last selected line: 0
  634. -- icon id / first selected line: 0 / 0
  635. -- text alignment: 1
  636. -- font id: 0
  637. -- text size: 12
  638. -- style flags: 0
  639. -- line height: 16
  640. -- part name: Cancel
  641. ----- HyperTalk script -----
  642. on mouseUp
  643.   pop card
  644. end mouseUp
  645.  
  646.  
  647.  
  648. -- part 24 (field)
  649. -- low flags: 80
  650. -- high flags: 0000
  651. -- rect: left=16 top=32 right=53 bottom=167
  652. -- title width / last selected line: 0
  653. -- icon id / first selected line: 0 / 0
  654. -- text alignment: 0
  655. -- font id: 20
  656. -- text size: 12
  657. -- style flags: 0
  658. -- line height: 16
  659. -- part name: source
  660.  
  661.  
  662. -- part 25 (button)
  663. -- low flags: 00
  664. -- high flags: A003
  665. -- rect: left=210 top=295 right=317 bottom=310
  666. -- title width / last selected line: 0
  667. -- icon id / first selected line: 0 / 0
  668. -- text alignment: 1
  669. -- font id: 0
  670. -- text size: 12
  671. -- style flags: 0
  672. -- line height: 16
  673. -- part name: Help
  674. ----- HyperTalk script -----
  675. on mouseUp
  676.   visual iris open slow
  677.   push card
  678.   go next
  679. end mouseUp
  680.  
  681.  
  682. -- part contents for background part 6
  683. ----- text -----
  684. iris
  685. wipe
  686. zoom
  687. barn-door
  688. dissolve
  689. scroll
  690. checkerboard
  691. venetiona blind
  692.  
  693.  
  694. -- part contents for background part 16
  695. ----- text -----
  696. left
  697. right
  698. up
  699. down
  700. open
  701. close
  702.  
  703.  
  704. -- part contents for background part 17
  705. ----- text -----
  706. very fast
  707. fast
  708. normal
  709. slow
  710. very slow
  711.  
  712.  
  713. -- part contents for card part 24
  714. ----- text -----
  715. target
  716.  
  717. -- part contents for background part 18
  718. ----- text -----
  719. Button F/X